﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Web/FarmMaster.master" AutoEventWireup="true" CodeFile="TeacherDetail.aspx.cs" Inherits="Web_TeacherDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script language="javascript" type="text/javascript">
        //说明 所有的元素以ul li ul li ul li的循环格式嵌套 如果没有下级分类 就用li a结束嵌套
        $(document).ready(function () {
            //$(".navvan ul li").children("ul").hide();
            $(".navvan").find("li").not(":has(ul)").children("a").css({ textDecoration: "none", color: "#333", background: "none" }).click(function () {

            });
            $(".navvan").find("li:has(ul)").children("a").css({ background: "url(images/statu_close.gif) no-repeat left top;" }).click(function () {
                if ($(this).next("ul").is(":hidden")) {
                    $(this).next("ul").slideDown("slow");
                    if ($(this).parent("li").siblings("li").children("ul").is(":visible")) {
                        $(this).parent("li").siblings("li").find("ul").slideUp("1000");
                        $(this).parent("li").siblings("li:has(ul)").children("a").css({ background: "url(images/statu_close.gif) no-repeat left top;" }).end().find("li:has(ul)").children("a").css({ background: "url(images/statu_close.gif) no-repeat left top;" });
                    }
                    $(this).css({ background: "url(images/statu_open.gif) no-repeat left top;" });
                    return false;
                } else {
                    $(this).next("ul").slideUp("normal");
                    //不用toggle()的原因是为了在收缩菜单的时候同时也将该菜单的下级菜单以后的所有元素都隐藏
                    $(this).css({ background: "url(images/statu_close.gif) no-repeat left top;" });
                    $(this).next("ul").children("li").find("ul").fadeOut("normal");
                    $(this).next("ul").find("li:has(ul)").children("a").css({ background: "url(images/statu_close.gif) no-repeat left top;" });
                    return false;
                }

            });
        });
</script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div id="main">
		<div class="left">
			<div class="left1">
				<div class="navvan">
                <div class="part">师资队伍</div>
                    <asp:Repeater ID="Layer1" runat="server" onitemdatabound="Layer1_ItemDataBound">
                        <ItemTemplate>
                            <ul class="outside">
		                        <li class="first">
			                        <a href="#"><asp:Label ID="V1" runat="server" Text='<%#Eval("Name") %>'></asp:Label></a>

                                    <ul class="child">
                                        <asp:Repeater ID="Layer2" runat="server" onitemdatabound="Layer2_ItemDataBound">
                                            <ItemTemplate>
				                                <li class="second">
					                                <a href="#"><asp:Label ID="V2" runat="server" Text='<%#Eval("Name") %>'></asp:Label></a>
                                            
                                                    <ul class="child">
                                                        <asp:Repeater ID="Layer3" runat="server">
                                                            <ItemTemplate>
                                                                    <li class="third">
                                                                        <a href="#"><%#Eval("Name") %></a>
                                                                        <ul class="fourth">
                                                                            <li><a href='Teachers.aspx?did=<%=Request.Params["did"]%>&rank=市外专家&course=<%#Eval("Name") %>'>市外专家</a></li>
                                                                            <li><a href='Teachers.aspx?did=<%=Request.Params["did"]%>&rank=市级专家&course=<%#Eval("Name") %>'>市级专家</a></li>
                                                                            <li><a href='Teachers.aspx?did=<%=Request.Params["did"]%>&rank=县级专家&course=<%#Eval("Name") %>'>县级专家</a></li>
                                                                        </ul>
                                                                    </li>
                                                            </ItemTemplate>
                                                        </asp:Repeater>
                                                    </ul>
                                                </li>
                                            </ItemTemplate>
                                        </asp:Repeater>
                                    </ul>
                                </li>
                            </ul>
                        </ItemTemplate>
                    </asp:Repeater>
                </div>
			</div>
			<div class="left2" style="padding-top:13px;">
				<div class="tle">
					<span class="text1">培训通知</span>
				</div>
				<div class="tents">
					<ul style=" padding-top:5px;">
                        <asp:Repeater ID="Repeater1" runat="server">
                            <ItemTemplate>
                                <li><%#string.Format("<a href='ViewTrain.aspx?pid={0}'>{1}</a>",Eval("ID"), Convert.ToString(Eval("Memo")).Length>12?Convert.ToString(Eval("Memo")).Substring(0, 11)+"...": Eval("Memo"))%></li>
                            </ItemTemplate>
                        </asp:Repeater>
					</ul>
				</div>

			</div>
			<div class="left2">
				<div class="tle">
					<span class="text1">最新动态</span>
				</div>
				<div class="tents">
					<ul style=" padding-top:5px;">
						<asp:Repeater ID="Repeater3" runat="server">
                            <ItemTemplate>
                                <li><a href='<%=Toolkit.ApplicationRoot %>/Html/<%#Eval("url") %>'><%#Eval("Title").ToString().Length>12?Eval("Title").ToString().Substring(0,11)+"...":Eval("Title") %></a></li>
                            </ItemTemplate>
                        </asp:Repeater>
					</ul>
				</div>
			</div>
		</div>
		<div class="right">
			<div class="headline">
				<%=path %>的简介
			</div>
			<div class="contenttt">
					<asp:DataList ID="DataList1" runat="server">
                            <ItemTemplate>
                                <table style="width:100%;">
                                    <tr>
                                        <td rowspan="5">
                                            <asp:Image ID="Image1" runat="server" ImageUrl='<%#Eval("photo") %>' Width="155px" Height="224px" />
                                        </td>
                                        <td class="style1" style=" text-align:center;">
                                           <%#Eval("rank") %>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            电子邮箱：<%#Eval("email") %></td>
                                    </tr>
                                    <tr>
                                        <td>
                                            主要职务：<%#Eval("duty") %></td>
                                    </tr>
                                    <tr>
                                        <td>
                                            主讲课程：<%#Eval("courses").ToString().Substring(0, Eval("courses").ToString().IndexOf("|"))%></br>
                                    <span style=" text-indent:2em;display:block;">其他课程：<%#Eval("courses").ToString().EndsWith("|") ? "无" : Eval("courses").ToString().Substring(Eval("courses").ToString().IndexOf('|') + 1)%></span>
                                            
                                            </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            简介：<%#Eval("memo") %></td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:DataList>
			</div>
            
		</div>
	</div>    
</asp:Content>

